
import ajax from '@/utils/request'
import { concatUrl } from '@/utils'

// 获取 sku 信息
export function getSkuInfo(data, fields: string | object = { fields: '*' }) {
  return ajax({
		url: concatUrl('/v1/goods/goods/platform-sku-info', fields),
    data
  })
}

// 添加到购物车、去购买
export function createCart(data, fields: string | object = { fields: '*' }) {
  return ajax({
    url: concatUrl('/v1/cart/create', fields),
    data,
    method: 'POST'
  })
}
